//
//  ForumDataTool.h
//  JiaoX
//
//  Created by yinqy on 15/2/27.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JXBaseTool.h"
#import "MineInteractResult.h"
#import "PostsDetailsResult.h"
#import "BBSHomeData.h"
#import "ChatSignature.h"
#import "PersonInfo.h"
#import "Integral.h"

@interface ForumDataTool :JXBaseTool


/**
 *  获取论坛/帖子列表
 *
 *  @param modelId 论坛id
 *  @param lastId  最后一个帖子id
 *  @param type     0 新鲜    1 精华
 *  @param success
 *  @param failure
 */
+(void)getHomeDataWithModelId:(NSString *)modelId pageIndex:(int)pageIndex lastId:(NSString *)lastId modulePostsType:(int)type success:(void (^)(BBSHomeData *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取我的互动相关数据（回复我的，我回复的，我的帖子）
 *
 *  @param url       回复我的：forum/replymine 我的帖子：forum/myPosts
 *  @param lastTime  最后一个的时间。用于加载更多
 *  @param replyType 回复类型(用于回复我的页面)，0是回复帖子 1是回复评论,不用此参数传-1
 *  @param success
 *  @param failure
 */
+(void)getMineInteractDataWithUrl:(NSString *)url lastTime:(NSString *)lastTime replyType:(NSString *)replyType success:(void (^)(MineInteractResult *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取帖子详情
 *
 *  @param postsId    帖子id
 *  @param lastComtId 最后一个评论id，用于加载更多
 *  @param posterType 0帖子内容+第一页所有评论；1第n页评论内容；2第n页楼主评论
 *  @param orderBy    asc 正序 desc 倒序
 *  @param success
 *  @param failure
 */
+(void)getPostsInfoWithPostsId:(NSString *)postsId lastComtId:(NSString *)lastComtId posterType:(int)posterType orderBy:(NSString *)orderBy success:(void (^)(PostsDetailsResult *result))success failure:(void (^)(NSError *error))failure;


/**
 *  发表新帖子
 *
 *  @param title     帖子标题
 *  @param content   帖子内容
 *  @param modelId   论坛id
 *  @param imageUrls 图标的地址 多个用逗号隔开
 *  @param prodId    商品的id
 *  @param success
 *  @param failure
 */
+(void)publishNewTopicWithTitle:(NSString *)title content:(NSString *)content modelId:(NSString *)modelId imageUrls:(NSString *)imageUrls prodId:(NSString *)prodId success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  请求帖子评论的详情
 *
 *  @param commentId  主评论的id
 *  @param lastComtId 最后一条子评论的Id,如果传空，则会反回主评论的内容，如果不传空，只返回子评论
 *  @param url        url
 *  @param success
 *  @param failure
 */
+(void)getComtDetailListWithComtId:(NSString *)commentId lastComtId:(NSString *)lastComtId url:(NSString *)url success:(void (^)(CommentInfo *result))success failure:(void (^)(NSError *error))failure;


/**
 *  获取聊天服务的签名
 *
 *  @param appId   应用id
 *  @param peerId  当前用户
 *  @param success
 *  @param failure
 */
+(void)getChatSignatureWithAppId:(NSString *)appId peerId:(NSString *)peerId success:(void (^)(ChatSignature *result))success failure:(void (^)(NSError *error))failure;

/**
 *  举报用户
 *
 *  @param userId  用户id
 *  @param success
 *  @param failure
 */
+(void)reportUserWithUserId:(NSString *)userId success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取版块列表
 *
 *  @param success
 *  @param failure
 */
+(void)getModeList:(void (^)(BBSHomeData *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取Ta人信息
 *
 *  @param userId    用户id
 *  @param pageIndex 页数
 *  @param success
 *  @param failure
 */
+(void)getForumUserInfoWithUserId:(NSString *)userId pageIndex:(NSInteger)pageIndex success:(void (^)(PersonInfo *result))success failure:(void (^)(NSError *error))failure;

/**
 *  当日首次登录积分显示
 *
 *  @param success
 *  @param failure
 */
+(void)getforumSupPoint:(void (^)(Integral *result))success failure:(void (^)(NSError *error))failure;

@end
